package com.example.widget_sdk;

import android.content.Context;
import android.graphics.Color;

import androidx.annotation.Nullable;

import com.yanyusong.y_divideritemdecoration.Dp2Px;
import com.yanyusong.y_divideritemdecoration.Y_Divider;
import com.yanyusong.y_divideritemdecoration.Y_DividerBuilder;
import com.yanyusong.y_divideritemdecoration.Y_DividerItemDecoration;

public class FindDecoration extends Y_DividerItemDecoration {
    private Context context;

    public FindDecoration(Context context) {
        super(context);
        this.context = context;
    }

    @Nullable
    @Override
    public Y_Divider getDivider(int itemPosition) {
        Y_Divider y_divider = null;
        if (itemPosition != 0) {
            Y_DividerBuilder y_dividerBuilder = new Y_DividerBuilder();
            y_dividerBuilder.setTopSideLine(true, Color.parseColor("#d4d4d4"), 1,0,0);
            y_divider = y_dividerBuilder.create();
        }else {
            Y_DividerBuilder builder = new Y_DividerBuilder();
            y_divider = builder.create();
        }
        return y_divider;
    }
}
